Change the Down button to be end-justified, so that clicking on it is a
authorJonathan Blandford <jrb@redhat.com>
Wed, 25 Aug 2004 19:19:43 +0000 (19:19 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Wed, 25 Aug 2004 19:19:43 +0000 (19:19 +0000)
Wed Aug 25 15:15:56 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
        button to be end-justified, so that clicking on it is a stable
        operation.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkpathbar.c

index efeefa73fd18df802a230652d763a9ea40c60792..6b734b3895b304274ae7572fda4a215f5ab063c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Aug 25 15:15:56 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
+       button to be end-justified, so that clicking on it is a stable
+       operation.
+
 Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtktreeview.c
index efeefa73fd18df802a230652d763a9ea40c60792..6b734b3895b304274ae7572fda4a215f5ab063c7 100644 (file)
@@ -1,3 +1,9 @@
+Wed Aug 25 15:15:56 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
+       button to be end-justified, so that clicking on it is a stable
+       operation.
+
 Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtktreeview.c
index efeefa73fd18df802a230652d763a9ea40c60792..6b734b3895b304274ae7572fda4a215f5ab063c7 100644 (file)
@@ -1,3 +1,9 @@
+Wed Aug 25 15:15:56 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
+       button to be end-justified, so that clicking on it is a stable
+       operation.
+
 Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtktreeview.c
index efeefa73fd18df802a230652d763a9ea40c60792..6b734b3895b304274ae7572fda4a215f5ab063c7 100644 (file)
@@ -1,3 +1,9 @@
+Wed Aug 25 15:15:56 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
+       button to be end-justified, so that clicking on it is a stable
+       operation.
+
 Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtktreeview.c
index bd8516f611eafff5a0d8c9d35a61db38c6a70184..9da508c7b19ec60383ced7635c3e1f78d970b1e9 100644 (file)
@@ -62,8 +62,8 @@ struct _ButtonData
   GtkFilePath *path;
   GtkWidget *image;
   GtkWidget *label;
-  gboolean ignore_changes;
-  gboolean file_is_hidden;
+  gint ignore_changes : 1;
+  gint file_is_hidden : 1;
 };
 
 G_DEFINE_TYPE (GtkPathBar,
@@ -428,11 +428,13 @@ gtk_path_bar_size_allocate (GtkWidget     *widget,
        {
          child_allocation.x -= path_bar->spacing;
          down_slider_offset = child_allocation.x - widget->allocation.x - path_bar->slider_width;
+         down_slider_offset = border_width;
        }
       else
        {
-         child_allocation.x += child_allocation.width + path_bar->spacing;
          down_slider_offset = child_allocation.x - widget->allocation.x;
+         down_slider_offset = allocation->width - border_width - path_bar->slider_width;
+         child_allocation.x += child_allocation.width + path_bar->spacing;
        }
     }
   /* Now we go hide all the widgets that don't fit */
@@ -940,6 +942,7 @@ make_directory_button (GtkPathBar  *path_bar,
   GtkWidget *label_alignment = NULL;
   ButtonData *button_data;
 
+  file_is_hidden = !! file_is_hidden;
   /* Is it a special button? */
   button_data = g_new0 (ButtonData, 1);
 
@@ -957,7 +960,7 @@ make_directory_button (GtkPathBar  *path_bar,
     case DESKTOP_BUTTON:
       button_data->image = gtk_image_new ();
       button_data->label = gtk_label_new (NULL);
-      label_alignment = gtk_alignment_new (0.5, 0.5, 0., 0.);
+      label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
       gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label);
       child = gtk_hbox_new (FALSE, 2);
       gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
@@ -966,7 +969,7 @@ make_directory_button (GtkPathBar  *path_bar,
     case NORMAL_BUTTON:
     default:
       button_data->label = gtk_label_new (NULL);
-      label_alignment = gtk_alignment_new (0.5, 0.5, 0., 0.);
+      label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
       gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label);
       child = label_alignment;
       button_data->image = NULL;